UK Patent GB 2 361 133 describes techniques for reducing the visibility of image impairments such as those caused by scratches to photographic film. Typically these methods form part of video signal processing that is applied to the output of a telecine process that scans film frames to create a video tape or file.
Typically, when a scratched film is scanned in a telecine to find brightness values for pixels, pixels close to scratches will be found to be less bright, because the scratch will have spread the light used to analyse the film in an unexpected direction that is (usually) not measured in the scanning process. Either negative or positive film may be scanned, and so a scratch may also result in brighter pixels when the image is displayed.
In order to appreciate the improved processing of the present invention it is helpful to review the principles of the above-referenced prior patent; FIG. 1 illustrates these. The figure assumes a real-time, streaming system but processing delays are ignored; it is assumed that when results from different blocks in the diagram are combined, the relative timing is adjusted so that data from equivalent image regions is combined. The following description also assumes that the image is represented as an array of pixels and the processing acts on pixel values. (These assumptions will be applied throughout this specification.)
The system of FIG. 1 repairs vertical scratches. Input video data (1) is passed to a horizontal median filter (2), which compares the value of each pixel with the values of its horizontally adjacent neighbours and, if its value is not the middle ranking member of the set of compared values, it replaces its value with the middle ranking value. This process removes vertical dark or light lines due to scratches, but also removes wanted picture information and noise.
The output from the median filter (2) is subtracted from the video data (1) in a subtractor (3). The result is a signal that represents scratches, some horizontal picture detail and noise. This signal is applied to a vertical low-pass filter (4), which removes most of the noise and some of the picture detail leaving a relatively ‘clean’ representation of the scratches.
The output of the vertical filter (4) is applied to a clipper (5), which has unity gain for signal values close to the value of a control parameter and low gain for other values. The purpose of this clipper is to remove remaining picture detail from the representation of the scratches. Typical scratches have a nearly constant value along their length, whereas typical picture detail will vary in the vertical direction. If the clipper's control parameter is made equal to the level of the scratch, then the picture detail differing from this level will be removed by the clipper.
The setting of the clipper control parameter is determined by a vertical averager (6) that vertically averages the output of the subtractor (3) so as to obtain an average pixel value corresponding to every horizontal position in the image. For example, in the typical case of an orthogonal array of digital active lines of pixels, there will be a set of N average values, where N is the number of pixels per digital active line. As scratches are likely to extend vertically over a significant portion of the image, the average value at the location of a scratch is likely to be equal to the value of the scratch. Picture information is much less likely to influence the average value.
At each horizontal position in the image the control parameter of the clipper (5) is made equal to the corresponding average value from the vertical averager (6). The clipper (5) thus passes the scratch representation but attenuates residual picture detail; its output (7) is thus a substantially noise-free representation of any scratches present in the input video data (1).
The scratch representation (7) is subtracted from the input video data (1) in a subtractor (8) so as to obtain ‘repaired’ video data (9).
There are several areas where the performance of this prior art scratch repair process can be improved. Listed below are some of the sources of error in the determination of the scratch, that is to say the signal (7) that will be subtracted from the input data (1) so as to repair the scratch.                Noise and film grain in the input data (1) are rectified by the non-linearity of the median filter (2). The resulting, spurious, low frequency components can pass through the processing chain and become combined with the repaired data (9).        Scratches do not always correspond to a fixed change in pixel values along their length. The loss of light (that would have been measured in order to find a pixel value when scanning a film frame) due to a scratch on the film surface often depends on the amount of light transmitted by the film in the vicinity of the scratch. In this case a vertically low-pass filtered difference signal cannot match the scratch.        Scratches may vary in ‘depth’ along their length. These variations cannot be tracked by a vertically low-pass filtered difference signal.        Clipping may not remove all the contributions to the difference signal from picture detail.        Scratches are not always exactly vertical.        
Some or all of these, or other, deficiencies of the prior art can be avoided or ameliorated by the techniques of the present invention.